package com.security.dao;

import com.security.auth.User;
import org.apache.ibatis.annotations.*;

/**
 * @program: myspringboot
 * @description:
 * @author: zyj
 * @create: 2020-01-06 11:52
 **/
@Mapper
public interface SecurityUserDao {
    @Results({
            @Result(column="id", property="id"),
            @Result(column="user_name", property="userName"),
            @Result(column="user_password", property="passWord"),
    })
    @Select("SELECT " +
            " id, " +
            " user_name, " +
            " user_password " +
            " FROM " +
            " my_user " +
            " where  user_name=#{userName}" )
    public User getUserByName(@Param("userName") String userName);
}
